mark<-read.table("../EUR.chr8.20110521.b37p0.snps.markers.gz",sep=" ",colClasses=c("character","numeric","character","character"))
data<-read.table("beagle_out_8.snps_chr8.bgl.gz.r2",sep="\t",colClasses=c("character","numeric"))
colnames(data)<-c("snp","r2")
colnames(mark)<-c("snp","pos","all1","all2")
merged<-merge(data,mark,by="snp")
merged$ref<-0.3
pdf("ucsf.pdf",width =30,height =30)
plot(merged$pos,merged$r2,xlab=c("postion"),ylab="r2 value",pch='*',xlim=c(128000000,131000000),col=c("green"))
points(merged$pos,merged$ref,col=c("red"))
legend("top", horiz=T,col=c("red","green"), lty=c(0,0), c("Imputation Reference_min_5_minor positions at 0.3 r2","r2 values of imputed UCSF data"), pch=c('*','*'),cex=2)
dev.off()
